Optimal. Leaf size=143 \[ -\frac {4 \sec ^7(c+d x)}{7 a^4 d}+\frac {4 \sec ^9(c+d x)}{3 a^4 d}-\frac {8 \sec ^{11}(c+d x)}{11 a^4 d}+\frac {\tan ^3(c+d x)}{3 a^4 d}+\frac {2 \tan ^5(c+d x)}{a^4 d}+\frac {25 \tan ^7(c+d x)}{7 a^4 d}+\frac {8 \tan ^9(c+d x)}{3 a^4 d}+\frac {8 \tan ^{11}(c+d x)}{11 a^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 184, normalized size of antiderivative = 1.29, number of steps
used = 8, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2949, 2751,
3852, 8} \begin {gather*} \frac {8 \tan (c+d x)}{231 a^4 d}-\frac {4 \sec (c+d x)}{231 d \left (a^4 \sin (c+d x)+a^4\right )}-\frac {4 \sec (c+d x)}{231 d \left (a^2 \sin (c+d x)+a^2\right )^2}+\frac {\sec ^3(c+d x)}{6 a d (a \sin (c+d x)+a)^3}-\frac {5 \sec (c+d x)}{231 a d (a \sin (c+d x)+a)^3}-\frac {\sec (c+d x)}{33 d (a \sin (c+d x)+a)^4}-\frac {a \sec (c+d x)}{22 d (a \sin (c+d x)+a)^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2751
Rule 2949
Rule 3852
Rubi steps
\begin {align*} \int \frac {\sec ^2(c+d x) \tan ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx &=\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}+\frac {1}{2} a \int \frac {\sec ^2(c+d x)}{(a+a \sin (c+d x))^5} \, dx\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}+\frac {3}{11} \int \frac {\sec ^2(c+d x)}{(a+a \sin (c+d x))^4} \, dx\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}+\frac {5 \int \frac {\sec ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx}{33 a}\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}-\frac {5 \sec (c+d x)}{231 a d (a+a \sin (c+d x))^3}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}+\frac {20 \int \frac {\sec ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx}{231 a^2}\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}-\frac {5 \sec (c+d x)}{231 a d (a+a \sin (c+d x))^3}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}-\frac {4 \sec (c+d x)}{231 d \left (a^2+a^2 \sin (c+d x)\right )^2}+\frac {4 \int \frac {\sec ^2(c+d x)}{a+a \sin (c+d x)} \, dx}{77 a^3}\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}-\frac {5 \sec (c+d x)}{231 a d (a+a \sin (c+d x))^3}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}-\frac {4 \sec (c+d x)}{231 d \left (a^2+a^2 \sin (c+d x)\right )^2}-\frac {4 \sec (c+d x)}{231 d \left (a^4+a^4 \sin (c+d x)\right )}+\frac {8 \int \sec ^2(c+d x) \, dx}{231 a^4}\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}-\frac {5 \sec (c+d x)}{231 a d (a+a \sin (c+d x))^3}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}-\frac {4 \sec (c+d x)}{231 d \left (a^2+a^2 \sin (c+d x)\right )^2}-\frac {4 \sec (c+d x)}{231 d \left (a^4+a^4 \sin (c+d x)\right )}-\frac {8 \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{231 a^4 d}\\ &=-\frac {a \sec (c+d x)}{22 d (a+a \sin (c+d x))^5}-\frac {\sec (c+d x)}{33 d (a+a \sin (c+d x))^4}-\frac {5 \sec (c+d x)}{231 a d (a+a \sin (c+d x))^3}+\frac {\sec ^3(c+d x)}{6 a d (a+a \sin (c+d x))^3}-\frac {4 \sec (c+d x)}{231 d \left (a^2+a^2 \sin (c+d x)\right )^2}-\frac {4 \sec (c+d x)}{231 d \left (a^4+a^4 \sin (c+d x)\right )}+\frac {8 \tan (c+d x)}{231 a^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.38, size = 166, normalized size = 1.16 \begin {gather*} \frac {\sec ^3(c+d x) (11264-1287 \cos (c+d x)-5632 \cos (2 (c+d x))+143 \cos (3 (c+d x))-2048 \cos (4 (c+d x))+325 \cos (5 (c+d x))+512 \cos (6 (c+d x))-13 \cos (7 (c+d x))+26048 \sin (c+d x)-1144 \sin (2 (c+d x))-704 \sin (3 (c+d x))-416 \sin (4 (c+d x))-1600 \sin (5 (c+d x))+104 \sin (6 (c+d x))+64 \sin (7 (c+d x)))}{118272 a^4 d (1+\sin (c+d x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.39, size = 218, normalized size = 1.52
method | result | size |
risch | \(-\frac {16 i \left (176 i {\mathrm e}^{7 i \left (d x +c \right )}+154 \,{\mathrm e}^{8 i \left (d x +c \right )}-88 i {\mathrm e}^{5 i \left (d x +c \right )}-253 \,{\mathrm e}^{6 i \left (d x +c \right )}-32 i {\mathrm e}^{3 i \left (d x +c \right )}+11 \,{\mathrm e}^{4 i \left (d x +c \right )}+8 i {\mathrm e}^{i \left (d x +c \right )}+25 \,{\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{231 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{11} d \,a^{4}}\) | \(132\) |
derivativedivides | \(\frac {-\frac {1}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {16}{11 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{11}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{10}}-\frac {64}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {36}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {295}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {71}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {43}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {9}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {109}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {5}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {8}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+128}}{a^{4} d}\) | \(218\) |
default | \(\frac {-\frac {1}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {16}{11 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{11}}+\frac {8}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{10}}-\frac {64}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}+\frac {36}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}-\frac {295}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}+\frac {71}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}-\frac {43}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {9}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {109}{48 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {5}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {8}{128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+128}}{a^{4} d}\) | \(218\) |
norman | \(\frac {-\frac {80 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}-\frac {16}{231 a d}-\frac {8 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {32 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {16 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {32 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7 a d}-\frac {32 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7 a d}-\frac {128 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{231 a d}-\frac {400 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{231 a d}-\frac {16 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {376 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{77 a d}+\frac {32 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{11} a^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}\) | \(247\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 528 vs.
\(2 (129) = 258\).
time = 0.36, size = 528, normalized size = 3.69 \begin {gather*} \frac {8 \, {\left (\frac {16 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {50 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {141 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {132 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {132 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {44 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {110 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {154 \, \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {308 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + \frac {154 \, \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} + \frac {77 \, \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} + 2\right )}}{231 \, {\left (a^{4} + \frac {8 \, a^{4} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {25 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {32 \, a^{4} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {11 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {88 \, a^{4} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {99 \, a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {99 \, a^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {88 \, a^{4} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} + \frac {11 \, a^{4} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} - \frac {32 \, a^{4} \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {25 \, a^{4} \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}} - \frac {8 \, a^{4} \sin \left (d x + c\right )^{13}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{13}} - \frac {a^{4} \sin \left (d x + c\right )^{14}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{14}}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 153, normalized size = 1.07 \begin {gather*} \frac {32 \, \cos \left (d x + c\right )^{6} - 80 \, \cos \left (d x + c\right )^{4} + 28 \, \cos \left (d x + c\right )^{2} + {\left (8 \, \cos \left (d x + c\right )^{6} - 60 \, \cos \left (d x + c\right )^{4} + 35 \, \cos \left (d x + c\right )^{2} + 49\right )} \sin \left (d x + c\right ) + 28}{231 \, {\left (a^{4} d \cos \left (d x + c\right )^{7} - 8 \, a^{4} d \cos \left (d x + c\right )^{5} + 8 \, a^{4} d \cos \left (d x + c\right )^{3} - 4 \, {\left (a^{4} d \cos \left (d x + c\right )^{5} - 2 \, a^{4} d \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sin ^{2}{\left (c + d x \right )} \sec ^{4}{\left (c + d x \right )}}{\sin ^{4}{\left (c + d x \right )} + 4 \sin ^{3}{\left (c + d x \right )} + 6 \sin ^{2}{\left (c + d x \right )} + 4 \sin {\left (c + d x \right )} + 1}\, dx}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.59, size = 198, normalized size = 1.38 \begin {gather*} -\frac {\frac {77 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5\right )}}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {462 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{10} + 5775 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 14399 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 29260 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 30800 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 27874 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12650 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 6556 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1210 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 935 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 127}{a^{4} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{11}}}{7392 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 16.00, size = 327, normalized size = 2.29 \begin {gather*} \frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}}{231}+\frac {128\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{231}+\frac {400\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{231}+\frac {376\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{77}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{7}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{7}-\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{21}+\frac {80\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{21}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{3}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{3}+\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}}{3}+\frac {8\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{3}}{a^4\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^{11}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________